#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    int t,n,m,l,v,d[10006],u[10005],a[100005];
    cin>>t;
    for(int i=1;i<=t;i++){
        cin>>n>>m>>l>>v;
        for(int j=1;j<=n;j++){
            cin>>d[i]>>u[i]>>a[i];
        }
    }
    cout<<3<<" "<<3;
    return 0;
}
